Using material types
Material types define the property type of a material. By adjusting material property values defined by a material type, you set the appearance of a material. Each material type has a vertex shader and a fragment shader, which set the type of properties you can use in a material.
Kanzi Studio provides template projects that contain a default set of material types and shaders from the Kanzi StudioAsset Library located in <KanziInstallation>/Studio/Asset Library. When you create a new Kanzi Studio project you can select from different project templates based on the material types they provide:
- Empty template does not contain any predefined material types. You can add material types from the Kanzi Studio material library to the project when you need them, or create your own material types. You can find the Kanzi Studio material library at <KanziInstallation>/Studio/Asset Library/MaterialTypes. See Using material types.
- Fast performance template is intended for low precision and high performance OpenGL ES2 applications. It contains vertex-based shaders optimized for use with OpenGL ES2. Most of the GPU specific computation is done in the vertex shaders. This is a good starting point for most mobile devices.
- High quality template is intended for high precision OpenGL ES2 applications. It contains pixel-shader based materials for use with OpenGL ES2. Most of the GPU specific computation is done in the fragment shaders. This offers better image quality often at the cost of performance.
Adding a material type to your project
To add a material type to your project:
- In the Library right-click Materials and Textures and select Load Material Type From Disk.
![](../../Resources/Images/Working with/Materials/Load Material Type from Disk.png)
- Go to <KanziInstallation>/Studio/Asset Library/MaterialTypes and select the directory that contains material types that best fit the needs of your project:
- ES2_High contains slower-performing material types with pixel-based shaders.
- ES2_Low contains fast-performing material types with vertex-based shaders.
- General contains material types with general purpose shaders. Because these shaders are more concerned with functionality and quality than performance, these material types are suitable for development purposes.
-
Select the material type that best fit the needs of your project and click Open.
Kanzi Studio adds the material type and creates a material using that material type. You can create additional materials from the same material type. See Using materials.
Reusing material types
When you create a material type in your Kanzi Studio project, you can reuse the material type in another Kanzi Studio project.
To reuse material types:
- In the Library > Materials and Textures > MaterialTypes right-click the material type you want to use in another project, and select Save Material Type to Disk.
- Select the name and location where you want to save the material type and click Save.
Now you can load that material type to another Kanzi Studio project.
See also
Using materials
Material types and materials
Open topic with navigation